﻿using System;
using System.Linq;
using System.Windows.Forms;
using Kay.LazarToDo.Win.Common;
using Kay.LazarToDo.Win.EntityFramework;

namespace Kay.LazarToDo.Win
{
    internal static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            using (var db = new LazarToDoDbContext())
            {
                GlobalVariables.DbContext = db;
                using (GlobalVariables.DbContext)
                {
                    Application.Run(new Startup());
                }
            }
        }
    }
}
